package cn.edu.zafu.bigdata.x.wupeng.a;

class TstCourse {
    // 课程属性
    private String courseId;       // 课程ID
    private String courseName;    // 课程名称
    private String courseDescription; // 课程描述
    private int credits;          // 学分
    private String instructor;    // 授课教师

    // 构造方法
    public TstCourse(String courseId, String courseName, String courseDescription, int credits, String instructor) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.courseDescription = courseDescription;
        this.credits = credits;
        this.instructor = instructor;
    }

    // getter和setter方法
    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseDescription() {
        return courseDescription;
    }

    public void setCourseDescription(String courseDescription) {
        this.courseDescription = courseDescription;
    }

    public int getCredits() {
        return credits;
    }

    public void setCredits(int credits) {
        this.credits = credits;
    }

    public String getInstructor() {
        return instructor;
    }

    public void setInstructor(String instructor) {
        this.instructor = instructor;
    }

    // 打印课程信息的方法
    public void print() {
        System.out.println("课程信息如下：");
        System.out.println("课程ID: " + courseId);
        System.out.println("课程名称: " + courseName);
        System.out.println("课程描述: " + courseDescription);
        System.out.println("学分: " + credits);
        System.out.println("授课教师: " + instructor);
    }

    // 主方法，用于测试Course类
    public static void main(String[] args) {
        TstCourse javaCourse = new TstCourse("CS101", "Java编程基础", "学习Java语言的基础知识", 4, "张三");
        javaCourse.print();
    }
}